package org.marverse.language

import scripting.{Expression, UncheckedExpression}
import scripting.ScriptingUtil._

class ParsedUncheckedExpr(val inner: UncheckedExpression, val parseInfo: Any) extends UncheckedExpression {
  
  override def childUncheckedExpressions = Seq(inner)
  override def checked(implicit ctx: MutableTypedMap[TypedKey, Any]) =
    new ParsedExpr(inner.checked, parseInfo)

}

class ParsedExpr(val inner: Expression, val parseInfo: Any) extends Expression {
  
  override def childExpressions = Seq(inner)
  override def expressionType(implicit ctx: MutableTypedMap[TypedKey, Any]) = inner.expressionType
  override def evaluate(implicit ctx: MutableTypedMap[TypedKey, Any]) = inner.evaluate

}
